{extend name="public/base"/}
{block name="body"}
<div class="main-box clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>{$meta_title}</h2>
		</div>
	</header>
	<div class="main-box-body clearfix">
		<div class="row">
			<form method="get">
				<div class="col-sm-12 col-md-1 col-lg-1">
					<select name="status" id="status" class="form-control">
						<option value="">状态</option>
						<option value="0" 
						{eq name="status" value="0"}selected{/eq} >未打款</option>
						<option value="1" {eq name="status" value="1"}selected{/eq}>已打款</option>
					</select>
				</div>
				<div class="col-sm-12  col-md-2 col-lg-2">
					
					<div class="input-group">
						<input type="text" class="form-control" name="startdata" id="startdata" value="{$startdata|date='Y-m-d',###}" placeholder="">
						<span class="input-group-addon"><i class="fa fa-th"></i></span>
					</div>
				</div>
				<div class="col-sm-12  col-md-2 col-lg-2">
					<div class="input-group">
						<input type="text" class="form-control" name="enddata" id="enddata" value="{$enddata|date='Y-m-d',###}" placeholder="">
						<span class="input-group-addon"><i class="fa fa-th"></i></span>
					</div>
				</div>
				<div class="col-sm-12 col-md-1 col-lg-1">
					<select name="uid" id="uid" class="form-control">
						<option value="">用户名</option>
						{volist name="member" id="vo"}
						{if $vo.uid == $uid}
							<option value="{$vo.uid}" selected>{$vo.username}</option>
						{else /}
							<option value="{$vo.uid}">{$vo.username}</option>
						{/if}
						
						{/volist}
					</select>
				</div>
				<div class="col-sm-12 col-md-1">
					<button class="btn btn-primary" type="submit">搜索</button>
				</div>
				<div class="col-sm-12 col-md-4">
				申请提现总额: ¥ {$cash.allcsah}, 待打款: ¥ {$cash.wcsah},已打款: ¥ {$cash.ycsah}
				</div>
			</form>
		</div>
		<ul class="nav nav-tabs" style="margin-top:20px;">
			<li {empty name="type"}class="active"{/empty}>
				<a href="{:url('remitlog')}">全部</a>
			</li>
			<li {eq name='type' value='2'}class="active"{/eq}>
				<a href="{:url('remitlog',array('type'=>2))}">个人</a>
			</li>
			<li {eq name='type' value='1'}class="active"{/eq}>
				<a href="{:url('remitlog',array('type'=>1))}">对公</a>
			</li>
		</ul>

		<div class="table-responsive clearfix">

			<div class="table-responsive clearfix">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>状态</th>
							<th>代理</th>
							<th>提交时间</th>
							<th>提现金额</th>
							<th>收款人</th>
							{if $Think.session.user_auth.group == 999}
							<th>操作</th>
							{/if}
						</tr>
					</thead>
					<tbody>
						{if condition="empty($list)"}
							<tr>
								<td colspan="4" align="center">暂无数据！</td>
							</tr>
						{else/}
							{volist name="list" id="item"}
								<tr>
									<td>{$item['status']==1?"<span class='label label-sm label-primary'>已打款</span>":"<span class='label label-sm label-warning'>未打款</span>"}</td>
									<td>{$item.uid|get_username}</td>
									<td>{$item.create_time|date='Y-m-d',###}</td>
									<td>{$item.money}</td>
									<td>
									{if $item.payment_type=="bank"}
										{$item.card_holder_name}
									{elseif $item.payment_type=="alipay"}
										{$item.alipay_account_name}
									{else}
										{$item.weixin_nickname}
									{/if}
									</td>
									{if $Think.session.user_auth.group == 999}<td><a href="{:url('cashstatus',array('id'=>$item.id))}" class="ajax-get">确认打款</a></td>
									{/if}
								</tr>
							{/volist}
						{/if}
					</tbody>
				</table>
			</div>
			{$page}
		</div>
	</div>
</div>
<!-- datepicker statr -->
<link href="/public/plugs/datepicker/css/foundation-datepicker.min.css" rel="stylesheet" type="text/css">
<script src="/public/plugs/datepicker/js/foundation-datepicker.js"></script>
<script src="/public/plugs/datepicker/js/foundation-datepicker.zh-CN.js"></script>
<script>
$('#startdata').fdatepicker({
	format: 'yyyy-mm-dd'
});
$('#enddata').fdatepicker({
	format: 'yyyy-mm-dd'
});
</script>

{/block}